import List from "./components";
import { FastApi } from "@/api";
import { useEffect, useState } from "react";

export default function Fast() {
  const [list, setList] = useState<IRecords[]>([]);

  useEffect(() => {
    FastApi().then((res) => {
      if (res.errCode === 0) {
        let data: IFastData = res.data;
        setList(data.records);
      }
    });
  }, []);

  return (
    <div>
      {list.map((el) => (
        <List data={el} key={el.id} />
      ))}
    </div>
  );
}
